

clear





**** Figure 5 

{
				use "$Replicationdirectory/_Data/Narrative Evidence/Trade data/TRADE_DATA.dta"


				label var ukandbritishcoloniesincludingdom  "British Empire"
				label var franceandfrenchcolonies "French Empire"
				label var thenetherlandsanddutchcolonies "Dutch Empire"
				label var  switzerland "Switzerland" 


				foreach x in ukandbritishcoloniesincludingdom franceandfrenchcolonies thenetherlandsanddutchcolonies switzerland{

				replace `x'=`x'*100



				}


				rename var1 Year
				tsset Year

				twoway (connected  ukandbritishcoloniesincludingdom franceandfrenchcolonies thenetherlandsanddutchcolonies switzerland Year, xsize(8)  lcolor( blue red dkorange green)  mcolor( blue red dkorange green) 	bgcolor(white)  graphregion(color(white))  bgcolor(white)  bgcolor(white) ytitle("{stMono:% of German Raw Material Imports}", size(small)) xtitle("") legend(c(4)  size(small) region(lcolor(none)) ring(2) pos(6))) 


				graph export "$Replicationdirectory/_Work/Output/Appendices/Figures/FigureA6_ImportsRawMaterials.pdf" ,replace 

 }
   

**** Financial Integration and Raw Material Graph ****
{
				clear


				import excel "$Replicationdirectory/_Data/Narrative Evidence/Financial integration/FINANCIAL_INTEGRATION DATA.xlsx", sheet("Sheet1") firstrow

				foreach x in UK FRA NET CH{
					replace `x'=100* `x'/TOT
					*replace `x'=GOV_`x'/GOV_TOT
					
					}
					
				gen en_type=_n

						 graph bar  UK FRA NET CH  , xsize(8)  blabel(total,format(%9.1f))   ytitle("{stMono:% Share in total}") over(en_type, relabel(1 "{stMono:Raw Material Imports}" 2 `" "{stMono:Debt of German banks}" "{stMono:to foreign banks}" "'  ) ) bar(1, color(blue)) bar(2, color(red)) bar(3, color(dkorange)) bar(4, color(green)) bgcolor(white)  graphregion(color(white)) legend(c(4)  size(small) region(lcolor(none)) ring(2) pos(6)		order( 1 "United Kingdom" 2 "France" 3 "Netherlands" 4 "Switzerland"))  
				
				
				graph export "$Replicationdirectory/_Work/Output/Figures/Figure5a_Integration.pdf" ,replace 
}
				  
   
 
 
**** Trade costs and export data 
{ 
 
 
 		**** Make JMN-tradecost measure data plot
		
					*** generate  German-Swiss trade-cost  (own reconstruction) 
					
						import excel "$Replicationdirectory/_Data/Narrative Evidence/Trade cost data/Trade Cost Switzerland/DataSwitzerland.xlsx", sheet("Data") firstrow clear



					*** load JMN data 
						append using "$Replicationdirectory/_Data/Narrative Evidence/Trade cost data/JMN/tbtbtc"



						keep if ctry1=="GER" | ctry2=="GER"


						gen 	containscountry	=	1		if		ctry1	==	"FRA"	|	ctry2	==	"FRA"
						replace 	containscountry	=	1		if		ctry1	==	"NET"	|	ctry2	==	"NET"
						replace 	containscountry	=	1		if		ctry1	==	"SWI"	|	ctry2	==	"SWI"
						replace 	containscountry	=	1		if		ctry1	==	"UK"	|	ctry2	==	"UK"
					 
					 
							 keep if containscountry==1
							 
							encode ctry1, gen(country1)
							encode ctry2, gen(country2)

							egen ID=group(country1 country2)


							xtset ID year
							 
							  keep if tin(1934,1938)
							  
							  
							  gen sigma=8
							  
							   
							  
							foreach x in exp1 exp2 gdp1 gdp2{
								replace `x'=`x'*10^6 
							}
							  
					   

					
							gen tc=	   (((gdp1-exp1)*(gdp2-exp2))/(trade12*trade21))^(1/14)-1

									
							keep ctry1 year tc
							reshape wide tc, i(year)	j(ctry1)	string
							
							
							*index to 1934
							foreach x in FRA NET SWI UK{
							
							gen `x'_1934=100*tc`x'/tc`x'[1]
							
							}
									
									
							rename year Year	
							
							
							label var UK_1934  "United Kingdom"
							label var FRA_1934 "France"
							label var NET_1934 "Netherlands"
							label var SWI_1934 "Switzerland"
									 
							twoway (connected UK_1934 FRA_1934 NET_1934 SWI_1934  Year, ylabel(,labsize(small))  lcolor( blue red dkorange green)  mcolor( blue red dkorange green) 	bgcolor(white)  graphregion(color(white))  bgcolor(white)  bgcolor(white) ytitle("{stMono:Bilateral trade costs (1934=100)}", size(small)) xtitle("") legend(c(4)  size(small) region(lcolor(none)) ring(2) pos(6))) 
							
						
						 
							graph export "$Replicationdirectory/_Work/Output/Figures/Figure5b_Tradecosts.pdf", replace
				
	 
						

					***** Validate with data in RM

					clear
							import excel "$Replicationdirectory/_Data/Narrative Evidence/Trade cost data/Trade Cost Switzerland/DataSwitzerland.xlsx", sheet("Exports_RM") firstrow

							rename A Year
							
							
							label var UK  "United Kingdom"
							
									foreach x in UK France Netherlands Switzerland{
									
									gen `x'_1933=100*`x'/`x'[1]
									
									}
							
							
							label var UK_1933				"United Kingdom"
							label var France_1933			"France"
							label var Netherlands_1933		"Netherlands"
							label var Switzerland_1933		"Switzerland"
							
						
						twoway (connected UK_1933 France_1933 Netherlands_1933 Switzerland_1933  Year, xsize(8) ylabel(,labsize(small))  lcolor( blue red dkorange green)  mcolor( blue red dkorange green) 	bgcolor(white)  graphregion(color(white))  bgcolor(white)  bgcolor(white) ytitle("{stMono:Exports from Germany (1933=100)}", size(small)) xtitle("") legend(c(4)  size(small) pos(6) ring(2) region(lcolor(none) ))) 
						
						
									 graph export "$Replicationdirectory/_Work/Output/Appendices/Figures/FigureA5_Exports.pdf", replace
}					 
					 
					 
					 
					 
					 
					 
					  
					 
 
 
 
 
 
  